package com.trg.generaltool.service.rabbitmq.conform.workqueue;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName: Customer
 * @Description:    Work 模型-消费者
 * @Author: tangrg
 * @Date: 2021/7/19 16:11
 * @Version: 1.0
 * @Return:
 **/
@Component
public class Customer {

    @RabbitListener(queuesToDeclare = @Queue(value = "work"))
    public void receive1(String msg){
        System.out.println("msg1:"+msg);
    }
    @RabbitListener(queuesToDeclare = @Queue(value = "work"))
    public void receive2(String msg){
        System.out.println("msg2:"+msg);
    }
}
